﻿<UserControl x:Class="Coolvis.Console.Theme.MainViewControl.OperationNavigation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" >
    <UserControl.Resources>
        <Style TargetType="{x:Type Button}" x:Key="BtnGreen">
            <Setter Property="Foreground" Value="#FEFEFE"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#549b35" Offset="0"/>
                        <GradientStop Color="#46842b" Offset="0.7"/>
                        <GradientStop Color="#46842b" Offset="0.7"/>
                        <GradientStop Color="#427c29" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="_border" BorderThickness="0" BorderBrush="{x:Null}" CornerRadius="5"   
    							Background="{TemplateBinding Background}" 
    							HorizontalAlignment="{TemplateBinding HorizontalAlignment}"   
    							VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0:0:0.5" />
                                        <!--<VisualTransition GeneratedDuration="0" To="Pressed" />-->
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Normal">
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_mask" Storyboard.TargetProperty="(Shape.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid>
                                <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                <Rectangle Name="_mask" Visibility="Hidden" Fill="#99cccccc" RadiusX="5" RadiusY="5"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type Button}" x:Key="BtnDark">
            <Setter Property="Foreground" Value="#FEFEFE"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#549b35" Offset="0"/>
                        <GradientStop Color="#46842b" Offset="0.7"/>
                        <GradientStop Color="#46842b" Offset="0.7"/>
                        <GradientStop Color="#427c29" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="_border" BorderThickness="0" BorderBrush="{x:Null}" CornerRadius="5"   
    							Background="{TemplateBinding Background}" 
    							HorizontalAlignment="{TemplateBinding HorizontalAlignment}"   
    							VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0:0:0.5" />
                                        <!--<VisualTransition GeneratedDuration="0" To="Pressed" />-->
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Normal">
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_mask" Storyboard.TargetProperty="(Shape.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid>
                                <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                <Rectangle Name="_mask" Visibility="Hidden" Fill="#99cccccc" RadiusX="5" RadiusY="5"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#73bed0" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#FF7DAFE2" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type ToggleButton}" x:Key="TBtnGreen">
            <Setter Property="Foreground" Value="#FEFEFE"/>
            <Setter Property="Width" Value="156"/>
            <Setter Property="Height" Value="48"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border BorderThickness="0" CornerRadius="1"
    							HorizontalAlignment="{TemplateBinding HorizontalAlignment}"   
    							VerticalAlignment="{TemplateBinding VerticalAlignment}"
                            x:Name="_border">
                            <ContentPresenter Content="{TemplateBinding Content}"/>
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Color="#55000000" Offset="0"/>
                                    <GradientStop Color="#55000000" Offset="0.7"/>
                                    <GradientStop Color="#55000000" Offset="0.7"/>
                                    <GradientStop Color="#55000000" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="true"/>
                            <Trigger Property="ToggleButton.IsChecked" Value="true">
                                <Trigger.EnterActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#549b35" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#46842b" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#46842b" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#427c29" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#55000000" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#55000000" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#55000000" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="_border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="#55000000" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </Trigger.ExitActions>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <DockPanel x:Name="dockPanel">
        <DockPanel.Resources>
            <Style TargetType="Grid" x:Key="gdFunc">
                <Setter Property="Height" Value="38" />
                <Setter Property="Width" Value="144" />
                <Setter Property="Margin" Value="20,0,0,0" />
                <Setter Property="DockPanel.Dock" Value="Left" />
                <Setter Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="../../Images/but.png" />
                    </Setter.Value>
                </Setter>
            </Style>

            <Style TargetType="Grid" x:Key="gdSelectFunc">
                <Setter Property="Height" Value="49" />
                <Setter Property="Width" Value="144" />
                <Setter Property="Margin" Value="20,0,0,10" />
                <Setter Property="DockPanel.Dock" Value="Left" />
                <Setter Property="Background">
                    <Setter.Value>
                        <ImageBrush ImageSource="../../Images/but2.png" />
                    </Setter.Value>
                </Setter>
            </Style>

            <Style TargetType="Image" x:Key="preSelect" >
                <Setter Property="Source" Value="../../Images/72.png" />
            </Style>
            <Style TargetType="Image" x:Key="refreshSelect" >
                <Setter Property="Source" Value="../../Images/62.png" />
            </Style>
            <Style TargetType="Image" x:Key="magnifierSelect" >
                <Setter Property="Source" Value="../../Images/52.png" />
            </Style>
            <Style TargetType="Image" x:Key="laserPenSelect" >
                <Setter Property="Source" Value="../../Images/g2.png" />
            </Style>

            <Style TargetType="Image" x:Key="pre" >
                <Setter Property="Source" Value="../../Images/7.png" />
            </Style>
            <Style TargetType="Image" x:Key="refresh" >
                <Setter Property="Source" Value="../../Images/6.png" />
            </Style>
            <Style TargetType="Image" x:Key="magnifier" >
                <Setter Property="Source" Value="../../Images/5.png" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsShowMagnifier}" Value="True">
                        <Setter Property="Source" Value="../../Images/52.png" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <Style TargetType="Image" x:Key="laserPen" >
                <Setter Property="Source" Value="../../Images/g1.png" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsShowLaserPen}" Value="true">
                        <Setter Property="Source" Value="../../Images/g2.png" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </DockPanel.Resources>
        <ToggleButton x:Name="spScene" Tag="func" Style="{StaticResource TBtnGreen}" Click="OnShowSelectScenePanel" Margin="5,5,5,5">
            <TextBlock Text="场景选择" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontFamily="微软雅黑" FontWeight="Bold" FontSize="18" Margin="5" />
        </ToggleButton>
        <ToggleButton Visibility="Collapsed" x:Name="spText" Tag="func" Style="{StaticResource TBtnGreen}" Click="spText_MouseLeftButtonDown" Margin="5,5,5,5" IsEnabled="False">
            <TextBlock Text="展示提纲" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontFamily="微软雅黑" FontWeight="Bold" FontSize="18" Margin="5" />
        </ToggleButton>

        <ToggleButton Visibility="Collapsed" x:Name="spInteraction" Tag="func" Style="{StaticResource TBtnGreen}" Click="spInteraction_MouseLeftButtonDown" Margin="5,5,5,5" IsEnabled="False">
            <TextBlock x:Name="interactionText" Text="自由交互模式" VerticalAlignment="Center" HorizontalAlignment="Center"  Foreground="White" FontFamily="微软雅黑" FontWeight="Bold" FontSize="18"/>
        </ToggleButton>

        <ToggleButton x:Name="spFunction" Tag="func" Style="{StaticResource TBtnGreen}" Click="spFunction_MouseLeftButtonDown" Margin="5,5,5,5">
            <TextBlock Text="系统功能" VerticalAlignment="Center" HorizontalAlignment="Center"  Foreground="White" FontFamily="微软雅黑" FontWeight="Bold" FontSize="18" Margin="5" />
        </ToggleButton>
        <Grid Visibility="Collapsed">
            <StackPanel VerticalAlignment="Center" Name="_ctlExtFuncContainer">

            </StackPanel>

            <Image x:Name="preImage" Tag="img" MouseDown="preImage_MouseLeftButtonDown" MouseEnter="preImage_MouseEnter" MouseLeave="preImage_MouseLeave" TouchUp="preImage_TouchUp" TouchEnter="preImage_TouchEnter" Style="{StaticResource pre}" Height="40" Width="40" Margin="0,0,20,0" VerticalAlignment="Center" DockPanel.Dock="Right"/>
            <Image x:Name="refreshImg" Tag="img" MouseDown="refreshImg_MouseLeftButtonDown" MouseEnter="refreshImg_MouseEnter" MouseLeave="refreshImg_MouseLeave" TouchUp="refreshImg_TouchUp" TouchEnter="refreshImg_TouchEnter" Style="{StaticResource refresh}" Height="40" Width="40" Margin="0,0,20,0" DockPanel.Dock="Right" VerticalAlignment="Center"/>
            <Image x:Name="magnifierImg" Tag="img" MouseDown="magnifierImg_MouseLeftButtonDown" MouseLeave="magnifierImg_MouseLeave" MouseEnter="magnifierImg_MouseEnter" Style="{StaticResource magnifier}" Height="40" Width="40" DockPanel.Dock="Right" Margin="0,0,20,0" VerticalAlignment="Center"/>
            <Image x:Name="laserPenImg" Tag="img" MouseDown="LaserPenImg_MouseLeftButtonDown" MouseLeave="laserPenImg_MouseLeave" MouseEnter="laserPenImg_MouseEnter" Style="{StaticResource laserPen}" Height="40" Width="40" DockPanel.Dock="Right" Margin="0,0,20,0" VerticalAlignment="Center"/>
            <StackPanel></StackPanel>
        </Grid>
    </DockPanel>
</UserControl>
